package tests.acceptanceTests;

import static org.junit.Assert.*;


import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

import sourceFiles.CentralComputer;
import sourceFiles.SupervisorStation;

/**
 * @author LASO-TEAM
 * 
 *         This test checks that a supervisor can create a ride and make it a
 *         regular ride as well
 * 
 */
public class AcceptanceTest2 extends AcceptanceTests {

	@BeforeClass
	public static void setUpBeforeClass() throws Exception {
		// this initializes the relevant classes for this test.
		String currentPath = new java.io.File(".").getCanonicalPath();
		currentPath = currentPath + IN_PROJECT_PATH_TO_TESTS;
		masterXMLFilePath = currentPath + "\\input\\TestsMaster2.xml";
		copyXMLFilePath = currentPath + "\\results\\AcceptanceTests2Result.xml";
	}

	/**
	 * copies the master test file to the new file that we are generating.
	 */
	@Before
	public void setUp() throws Exception {
		copySourceFile();
		centralComputer = new CentralComputer(copyXMLFilePath);
		supervisorStation = new SupervisorStation(centralComputer);
	}

	@Test
	public void test() {
		for (int i = 0; i < rideNames.length; i++) {
			try {
				supervisorStation.createNewRide(rideNames[i], NOT_EXTREME, 1,
						1, 1);
			} catch (Exception e) {
				fail("supposed to succeed. all the params are valid.");
			}

		}

	}

}
